package storagews.impl;

import core.ws.UserSession;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Context;
import org.scribe.model.Token;

/**
 *
 * @author Admin
 */
public abstract class ServiceBase {

    @Context
    protected HttpServletRequest httpServletRequest;

    public UserSession session() {
        return new UserSession(httpServletRequest);
    }

    public Token getToken(String storageType) {
        return session().getToken(storageType);
    }
    
    public boolean hasToken(String storageType)
    {
        return session().hasToken(storageType);
    }
}
